package com.py.apis.article.fallback;

import com.py.apis.article.IArticleClient;
import com.py.model.article.dtos.ArticleDto;
import com.py.model.behavior.dtos.LikesBehaviorDto;
import com.py.model.behavior.dtos.ReadBehaviorDto;
import com.py.model.behavior.dtos.UnLikesBehaviorDto;
import com.py.model.common.dtos.ResponseResult;
import com.py.model.common.enums.AppHttpCodeEnum;
import com.py.model.moment.dtos.CommentSaveDto;
import org.springframework.stereotype.Component;

/**
 * @Description TODO 服务降级
 * @Author bo.li
 * @Date 2022/11/11 10:35
 * @Version 1.0
 */
@Component
public class IArticleClientFallback implements IArticleClient {

    @Override
    public ResponseResult saveArticle(ArticleDto dto) {
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR);
    }

    /**
     * 文章点赞
     * @param dto
     * @return
     */
    @Override
    public Integer articleLikes(LikesBehaviorDto dto) {
        return null;
    }

    /**
     * 文章阅读量
     * @param dto
     * @return
     */
    @Override
    public Integer articleRead(ReadBehaviorDto dto) {
        return null;
    }

    /**
     * 文章不喜欢
     * @param dto
     * @return
     */
    @Override
    public Integer articleUnLike(UnLikesBehaviorDto dto) {
        return null;
    }

    @Override
    public boolean query(CommentSaveDto commentSaveDto) {
        return false;
    }

}